package week03;

	import java.util.Arrays;
	import java.util.Scanner;

	public class week0303 {
		public static class Rectangle {
			private int width;
			private int length;
			Rectangle(int width,int length) {
				this.width = width;
				this.length = length;
			}
			@Override
			public String toString() {
				return "Rectangle [width=" + width + ", length=" + length + "]";
			}
			public int getPerimeter() {
				return (width+length)*2;
			}
			public int getArea() {
				return width * length;
			}
		}
		public static class Circle {
			private int radius;
			Circle(int radius) {
				this.radius = radius;
			}
			@Override
			public String toString() {
				return "Circle [radius=" + radius + "]";
			}
			public int getPerimeter() {
				return (int)(2*Math.PI*radius);
			}
			public int getArea() {
				return (int)(Math.PI*radius*radius);
			}
		}
		public static void main(String[] args) {
			Scanner in = new Scanner(System.in);
			Rectangle[] rec = new Rectangle[2];
			Circle[] cir = new Circle[2];
			for(int i = 0;i<2;i++) {
				int t1 = in.nextInt();
				int t2 = in.nextInt();
				rec[i] = new Rectangle(t1,t2);
			}
			for(int i = 0;i<2;i++) {
				int t = in.nextInt();
				cir[i] = new Circle(t);		
			}
			System.out.println(rec[0].getPerimeter()+rec[1].getPerimeter()+cir[0].getPerimeter()+cir[1].getPerimeter());
			System.out.println(rec[0].getArea()+rec[1].getArea()+cir[0].getArea()+cir[1].getArea());
			System.out.println(Arrays.deepToString(rec));
			System.out.println(Arrays.deepToString(cir));
			
		}
			
	}

